<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>

    /* function add(a,b){
       return a + b;
     }

     let result = add(1,2);

     alert(result);*/

    var add = function (a, b) {
        return a + b;
    }

    // let result = add(1,2);
    // alert(result);

    // let result1 = add(1, 2, 3);
    // alert(result1);

    let result2 = add(1);
    alert(result2);

</script>
</body>
</html>